from drg_group.haerbin_2022.Base import message,intersect,SS_VALID
from drg_group.haerbin_2022.DRG import MDCD_DRG

def group(record):
  adrg_zd=[]
  adrg_zd1=[]
  adrg_ss=["20.9501","20.9502","20.9601","20.9602","20.9701","20.9702","20.9801","20.9802"]
  adrg_ss1=[]
  adrg_ss2=[]
  dept_list=[]
  if True and record.ssList and record.ssList[0] in adrg_ss and record.ssList and intersect(record.ssList,adrg_ss):
    message('符合DB2入组条件，匹配规则：主手术匹配、某一手术匹配')
    
    if MDCD_DRG.DB29_group(record):
      return 'DB29'

    return ''
  else:
    return ''

